import {post} from '@/utils/http'

export function getPhoneNumberInfo(data = {}){
  // 添加默认参数
  const defaultData = {
    ...data
  }
  return post('/user/user-client/cms/userInfo/listAll', defaultData)
}

//新增
export function createPhoneNumberInfo(data) {
  return post('/user/user-client/cms/userInfo/insert', data)
}

//修改
export function updatePhoneNumberInfo(data) {
  return post('/user/user-client/cms/userInfo/update', data)
}

//删除
export function deletePhoneNumberInfo(id) {
  return post(`/user/user-client/cms/userInfo/delete?id=${id}`)
}

//批量删除
export function deleteBatchPhoneNumberInfo(ids) {
  // ids 应该是一个字符串，包含以逗号分隔的ID列表，例如 "1,2,3"
  return post('/user/user-client/cms/userInfo/deleteBatch', null, {
    params: { ids }
  })
}

//查询单个
export function getPhoneNumberInfoById(id) {
  return post('/user/user-client/cms/userInfo/get', {id})
}


//新增
export function customerPhone(data) {
  return post('/user/user-client/cms/customerPhone/insert', data)
}

//查询
export function getCustomerPhone(data = {}){
  // 添加默认参数
  const defaultData = {
    ...data
  }
  return post('/user/user-client/cms/customerPhone/listAll', defaultData)
}
//删除
export function deleteCustomerPhone(id) {
  return post(`/user/user-client/cms/customerPhone/delete?id=${id}`)
}

//批量删除
export function deleteBatchCustomerPhone(ids) {
  // ids 应该是一个字符串，包含以逗号分隔的ID列表，例如 "1,2,3"
  return post('/user/user-client/cms/customerPhone/deleteBatch', null, {
    params: { ids }
  })
}